package com.googlecode.websecuritychecks.testmodel;

import java.io.*;
import java.security.Principal;
import java.util.*;

import javax.servlet.*;
import javax.servlet.http.*;

public class MockHttpServletRequest extends HttpServletRequestWrapper {
    
    private Map<String, String[]> paramMap = new LinkedHashMap<>();
    
    public MockHttpServletRequest() {
        this(new HttpServletRequest() {
            
            @Override
            public AsyncContext startAsync(ServletRequest arg0, ServletResponse arg1) throws IllegalStateException {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public AsyncContext startAsync() throws IllegalStateException {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public void setCharacterEncoding(String arg0) throws UnsupportedEncodingException {
                // TODO Auto-generated method stub
                
            }
            
            @Override
            public void setAttribute(String arg0, Object arg1) {
                // TODO Auto-generated method stub
                
            }
            
            @Override
            public void removeAttribute(String arg0) {
                // TODO Auto-generated method stub
                
            }
            
            @Override
            public boolean isSecure() {
                // TODO Auto-generated method stub
                return false;
            }
            
            @Override
            public boolean isAsyncSupported() {
                // TODO Auto-generated method stub
                return false;
            }
            
            @Override
            public boolean isAsyncStarted() {
                // TODO Auto-generated method stub
                return false;
            }
            
            @Override
            public ServletContext getServletContext() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public int getServerPort() {
                // TODO Auto-generated method stub
                return 0;
            }
            
            @Override
            public String getServerName() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public String getScheme() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public RequestDispatcher getRequestDispatcher(String arg0) {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public int getRemotePort() {
                // TODO Auto-generated method stub
                return 0;
            }
            
            @Override
            public String getRemoteHost() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public String getRemoteAddr() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public String getRealPath(String arg0) {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public BufferedReader getReader() throws IOException {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public String getProtocol() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public String[] getParameterValues(String arg0) {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public Enumeration<String> getParameterNames() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public Map<String, String[]> getParameterMap() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public String getParameter(String arg0) {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public Enumeration<Locale> getLocales() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public Locale getLocale() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public int getLocalPort() {
                // TODO Auto-generated method stub
                return 0;
            }
            
            @Override
            public String getLocalName() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public String getLocalAddr() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public ServletInputStream getInputStream() throws IOException {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public DispatcherType getDispatcherType() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public String getContentType() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public int getContentLength() {
                // TODO Auto-generated method stub
                return 0;
            }
            
            @Override
            public String getCharacterEncoding() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public Enumeration<String> getAttributeNames() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public Object getAttribute(String arg0) {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public AsyncContext getAsyncContext() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public void logout() throws ServletException {
                // TODO Auto-generated method stub
                
            }
            
            @Override
            public void login(String arg0, String arg1) throws ServletException {
                // TODO Auto-generated method stub
                
            }
            
            @Override
            public boolean isUserInRole(String arg0) {
                // TODO Auto-generated method stub
                return false;
            }
            
            @Override
            public boolean isRequestedSessionIdValid() {
                // TODO Auto-generated method stub
                return false;
            }
            
            @Override
            public boolean isRequestedSessionIdFromUrl() {
                // TODO Auto-generated method stub
                return false;
            }
            
            @Override
            public boolean isRequestedSessionIdFromURL() {
                // TODO Auto-generated method stub
                return false;
            }
            
            @Override
            public boolean isRequestedSessionIdFromCookie() {
                // TODO Auto-generated method stub
                return false;
            }
            
            @Override
            public Principal getUserPrincipal() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public HttpSession getSession(boolean arg0) {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public HttpSession getSession() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public String getServletPath() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public String getRequestedSessionId() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public StringBuffer getRequestURL() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public String getRequestURI() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public String getRemoteUser() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public String getQueryString() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public String getPathTranslated() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public String getPathInfo() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public Collection<Part> getParts() throws IOException, ServletException {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public Part getPart(String arg0) throws IOException, ServletException {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public String getMethod() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public int getIntHeader(String arg0) {
                // TODO Auto-generated method stub
                return 0;
            }
            
            @Override
            public Enumeration<String> getHeaders(String arg0) {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public Enumeration<String> getHeaderNames() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public String getHeader(String arg0) {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public long getDateHeader(String arg0) {
                // TODO Auto-generated method stub
                return 0;
            }
            
            @Override
            public Cookie[] getCookies() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public String getContextPath() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public String getAuthType() {
                // TODO Auto-generated method stub
                return null;
            }
            
            @Override
            public boolean authenticate(HttpServletResponse arg0) throws IOException, ServletException {
                // TODO Auto-generated method stub
                return false;
            }
        });
    }
    
    public MockHttpServletRequest(HttpServletRequest request) {
        super(request);
    }
    
    public void addParam(String paramName, String[] paramValues) {
        paramMap.put(paramName, paramValues);
    }

    @Override
    public Map<String, String[]> getParameterMap() {
        return paramMap;
    }
    
    

}
